package com.aiyige.page.edituserinfo;

import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;

import com.aiyige.R;
import com.aiyige.arouter.config.ARouterConfig;
import com.aiyige.page.edituserinfo.adapter.EditUserAddressPagerAdapter;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.flyco.tablayout.SlidingTabLayout;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

@Route(path = ARouterConfig.EditUserAddressPage)
public class EditUserAddressPage extends AppCompatActivity {

    @BindView(R.id.tabLayout)
    SlidingTabLayout tabLayout;
    @BindView(R.id.titleBackBtn)
    ImageView titleBackBtn;
    @BindView(R.id.mainVp)
    ViewPager mainVp;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.page_edit_user_address);
        ButterKnife.bind(this);
        ARouter.getInstance().inject(this);
        mainVp.setAdapter(new EditUserAddressPagerAdapter(getSupportFragmentManager()));
        tabLayout.setViewPager(mainVp);
    }

    @OnClick(R.id.titleBackBtn)
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.titleBackBtn:
                finish();
                break;
        }
    }
}
